package com.imc.platform.base.leave.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.imc.core.utils.MysqlUtil;
import com.imc.platform.base.leave.dao.IPlatLeaveMapper;
import com.imc.platform.base.leave.pojo.Leave;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Map;

/*
* 类描述：请假服务类
* 开发者：YT
* 创建日期：2018/10/27 22:23
*/
@Service
@Transactional
@Slf4j
public class PlatLeaveServiceImpl implements IPlatLeaveService{

    @Autowired
    IPlatLeaveMapper leaveMapper;

    @Autowired
    MysqlUtil mysqlUtil;

    /*
    * YT  2018/10/27 22:23
    * 方法描述：查询请假信息
    */
    public PageInfo<Leave> queryLeaveByMap(int pageNumber, int pageSize, Map<String, String> signMap) {
        PageHelper.startPage(pageNumber,pageSize,true);
        PageInfo info= new PageInfo<Leave>(leaveMapper.queryLeaveByMap(signMap));
        return info;
    }
}
